package com.wang.模式.创建.工厂.工厂方法;

import com.wang.模式.创建.工厂.BJCheesePizza;
import com.wang.模式.创建.工厂.BJPepperPizza;
import com.wang.模式.创建.工厂.Pizza;

public class BJOrderPizza extends OrderPizza {
    @Override
    Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if (orderType.equals("cheese")) {
            pizza = new BJCheesePizza();
        } else if (orderType.equals("pepper")) {
            pizza = new BJPepperPizza();
        }
        return pizza;
    }
}